package com.example.kfcclient;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;

public class MainActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }

	/* (non-Javadoc)
	 * @see android.app.Activity#onOptionsItemSelected(android.view.MenuItem)
	 */
    // khởi tạo menu 
	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		// TODO Auto-generated method stub
		switch(item.getItemId()){
		// chuyển sang activity món ăn để chọn món
			case R.id.add:
				Intent intent = new Intent(MainActivity.this,expListActivity.class);
				startActivity(intent);
				return true;
		// chuyển sang activity giới thiệu về chương trình
			case R.id.about:
				
			default:return super.onOptionsItemSelected(item);
		}
		
	}
    
}
